package jeecg.business.service.impl.email;

import java.util.List;

import jeecg.business.entity.email.NmsSendMailEntity;
import jeecg.business.service.email.NmsSendMailServiceI;

import org.jeecgframework.core.common.service.impl.CommonServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service("nmsSendMailService")
@Transactional
public class NmsSendMailServiceImpl extends CommonServiceImpl implements NmsSendMailServiceI {
	public NmsSendMailEntity random(){
		String hql = " from NmsSendMailEntity where zt = '1' order by RAND() ";
		List<NmsSendMailEntity> list = findByQueryString(hql,0,1);
		if(list != null && list.size()>0) return list.get(0);
		return null;
	}
}